﻿<%@ Page Title="Plan Route" Language="C#" Culture="auto" UICulture="auto" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlanRoute.aspx.cs" Inherits="IFD2.PlanRoute" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label3" runat="server" Text="ID:" meta:resourcekey="ID"></asp:Label>
                <asp:Label ID="lblID" runat="server"></asp:Label><br />
                <asp:Label ID="Label1" runat="server" Text="Flight:" meta:resourcekey="Flight"></asp:Label>
                <asp:Label ID="lblAirline" runat="server"></asp:Label>
                <asp:Label ID="lblFltNo" runat="server"></asp:Label>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            DataSourceID="sqlPlanRoute" ForeColor="#333333" GridLines="None" style="min-width:700px;width:100%;" class="table-hover">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:TemplateField HeaderText=" ">
                                    <ItemTemplate>
                                        <input name="KEY2" type="radio" value='<%# Eval("airline")+"|"+Eval("flt_no")+"|"+Eval("id")+"|"+Eval("stop_sn") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="stop_sn" HeaderText="Sn" SortExpression="stop_sn"  meta:resourcekey="stop_sn" />
                                <asp:BoundField DataField="airport" HeaderText="airport" SortExpression="airport"  meta:resourcekey="airport1" />
                                <asp:BoundField DataField="terminal" HeaderText="terminal" SortExpression="terminal"  meta:resourcekey="terminal1" />
                                <asp:BoundField DataField="ground_minutes" HeaderText="ground_minutes" SortExpression="ground_minutes"  meta:resourcekey="ground_minutes" />
                                <asp:BoundField DataField="fly_minutes" HeaderText="fly_minutes" SortExpression="fly_minutes"  meta:resourcekey="fly_minutes" />
        <%--                        <asp:BoundField DataField="arr_date_diff" HeaderText="arr_date_diff" SortExpression="arr_date_diff"  meta:resourcekey="arr_date_diff" />
                                <asp:TemplateField HeaderText="arr_time" SortExpression="arr_time" meta:resourcekey="arr_time">
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Convert.ToDateTime(Eval("arr_time")).ToShortTimeString() %>' ></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="dep_date_diff" HeaderText="dep_date_diff" SortExpression="dep_date_diff"  meta:resourcekey="dep_date_diff" />
                                <asp:TemplateField HeaderText="dep_time" SortExpression="dep_time" meta:resourcekey="dep_time">
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Convert.ToDateTime(Eval("dep_time")).ToShortTimeString() %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user"  meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time"  meta:resourcekey="done_time" />
                            </Columns>
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </div>
                    <asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click"  meta:resourcekey="Delete" CssClass="btn btn-sm btn-default"/><br />
                    <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>

                    <div class="well well-sm">
                        <div class="form-group">
                        <asp:Label ID="Label2" runat="server" Text="SN:" meta:resourcekey="SN"></asp:Label>
                        <asp:DropDownList ID="lstTripSn" runat="server">
                            <asp:ListItem Selected="True">1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem Value="3"></asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                        </asp:DropDownList>
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label4" runat="server" Text="Airport:" meta:resourcekey="Airport"></asp:Label>
                        <asp:TextBox ID="txtAirport" runat="server" MaxLength="4" Width="47px"></asp:TextBox>
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label9" runat="server" Text="Terminal:" meta:resourcekey="Terminal"></asp:Label>
                        <asp:TextBox ID="txtTerminal" runat="server" MaxLength="2" Width="29px"></asp:TextBox>
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label11" runat="server" Text="Ground Minutes:" meta:resourcekey="GroundMinutes"></asp:Label>
                        <asp:TextBox ID="txtGroundMinutes" runat="server" MaxLength="4" Width="35px"></asp:TextBox>
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label10" runat="server" meta:resourcekey="FlyMinutes" Text="Fly Minutes:"></asp:Label>
                        <asp:TextBox ID="txtMinutes" runat="server" MaxLength="4" Width="35px"></asp:TextBox>
                        </div>
                        <asp:Button ID="btnAdd" runat="server" CssClass="btn btn-sm btn-default" OnClick="btnAdd_Click" Text="Add Next Stop"  meta:resourcekey="AddNextStop" />
                    </div>

                    <div class="well well-sm">
                        <div class="btn-group">
                            <asp:Button ID="btnGenSegData" runat="server" CssClass="btn btn-sm btn-default" OnClick="btnGenSegData_Click" Text="Generate Inventory"  meta:resourcekey="GenerateSegmentData" />
                            <asp:Button ID="btnClear" runat="server" CssClass="btn btn-sm btn-default" OnClick="btnClear_Click" Text="Clear Inventory"   meta:resourcekey="ClearInventory" />
                        </div>
                    </div>
                </div>
                <asp:SqlDataSource ID="sqlPlanRoute" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                    SelectCommand="bll_plan_get_route_info" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                    <SelectParameters>
                        <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                        <asp:ControlParameter ControlID="lblFltNo" Name="flt_no" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="lblID" Name="id" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </div>
        </div>
    </div>

    </div>
    </ContentTemplate></asp:UpdatePanel>
    </form>

</asp:Content>
